﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace LogicUniversity.Employee
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            DataTable tb = new DataTable();
            tb.Columns.Add(new DataColumn("test",typeof(string)));

            DataRow row = tb.NewRow();
            tb.Rows.Add(row);

            GridView1.DataSource = tb;
            GridView1.DataBind();
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            ((TextBox)GridView1.Rows[0].Cells[0].FindControl("TextBox1")).Text = "Hey";
        }
    }
}